<?php

namespace backend\models;

use Yii;

/**
 * This is the model class for table "{{%edu_teacher_info}}".
 *
 * @property integer $teacher_id
 * @property string $teacher_name
 * @property string $teacher_thumb
 * @property string $teacher_desc
 * @property integer $position_id
 * @property integer $from_id
 * @property string $teacher_at
 */
class Teacher extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%teacher_info}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['position_id', 'from_id'], 'integer'],
            [['teacher_name'], 'string', 'max' => 20],
            [['teacher_thumb'], 'string', 'max' => 50],
            [['teacher_desc', 'teacher_at'], 'string', 'max' => 255]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'teacher_id' => 'Teacher ID',
            'teacher_name' => 'Teacher Name',
            'teacher_thumb' => 'Teacher Thumb',
            'teacher_desc' => 'Teacher Desc',
            'position_id' => 'Position ID',
            'from_id' => 'From ID',
            'teacher_at' => 'Teacher At',
        ];
    }
}
